import { useState, useCallback } from 'react';
function useBarStyle(setScrollVisible, scrollBarType) {    
    const [barStyle, setBarStyle] = useState(() => {
        return scrollBarType === 'unoccupied' ? { background: 'transparent', position: 'absolute', bottom: 0, left: 0 } : {};
    });
    const setBarVisible = (v) => {
        setBarStyle(prevState => {
            return { ...prevState, height: v ? 'auto' : 0 }
        })
        setScrollVisible('x', v);
    };
    return { barStyle, setBarVisible }
}
export default useBarStyle;